﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chkapply.aspx.cs" Inherits="system_chkapply" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>审核赠刊申请</title>
    <link href="../css/tabmenu_blue.css" rel="stylesheet" type="text/css" />
    <link href="../css/pagebox.css" rel="stylesheet" type="text/css" />
	<style type="text/css">	    td{	        font-size:10pt;	    }	    .thead00{	        font-size:11pt;	        background-color: #f5f5f5;	    }	    .thead01{	        font-size:11pt;	        background-color: #add8e6;	    }	    .td01{	        color:green;	        cursor:hand;            background-color:#99cc99;
	    }	    .td02{	        color:#ff6600;	        cursor:hand;            background-color:#ffcc66;
	    }	    .tr_pass{
            background-color:#99cc99;
	    }
	    .tr_cancel{
            background-color:#ffcc66;
	    }
        .odd {background-color:#f5f5f5;}
        .even {background-color:#ffffff;}
	</style>	<script type="text/javascript" src="../jquery/126/jquery-1.2.6.js"></script>    <script type="text/javascript">
        function findlist(menunum)
        {
            var menuitem='menu0'+menunum;
            $('#nav a').removeClass('now');
            $('#'+menuitem).addClass('now');
            
            $('#chkflag').val(menunum);
            
            getlinkmans(1);
        }
        
        function getcount()
        {
	        var urlstring='chkapply_count.ashx?status='+$('#chkflag').val()+'&_='+(new Date()).getTime();	        $.ajax({	            url:urlstring,	            type:'get',	            dataType:'html',	            error:function()	            {	                $("#mancount").empty().append("error!");	            },	            success: function(msg)	            {	                $("#mancount").empty().append('&nbsp;'+msg);	            }	        });        }
        
        function getlinkmans(pagenum)
        {
	        var urlstring='chkapply_list.aspx?status='+$('#chkflag').val()+'&pagenum='+pagenum+'&_='+(new Date()).getTime();            	        $.ajax({	            url:urlstring,	            type:'get',	            dataType:'html',	            beforeSend:function()	            {	                $("#chklist").empty().append("<img id='loading' src='../images/loading2.gif' />正在加载,请稍等......");	            },	            error:function()	            {	                $("#chklist").empty().append("read error!");	            },	            success: function(msg)	            {	                $("#chklist").empty().append(msg);                    $('#mymans tbody tr:odd').addClass('odd');
                    $('#mymans tbody tr:even').addClass('even');
                    getcount();
	            }	        });        }
        
        function ispass(manid,opt)
        {
            $("#"+manid).removeClass('odd');
            $("#"+manid).removeClass('even');
            $("#"+manid).removeClass('tr_pass');
            $("#"+manid).removeClass('tr_cancel');

            var msg='';
            if(opt=='4')
            {
                $("#"+manid).addClass('tr_pass');
                msg='确认要同意吗？';
            }
            else
            {
                $("#"+manid).addClass('tr_cancel');
                msg='确认不同意吗？';
            }
            if(confirm(msg))
            {
	            $.ajax({                    url:'chkapply_pass.ashx?manid='+manid+'&opt='+opt,                    type:'get',	                error:function()	                {	                    alert('操作失败!');	                },                    success:function()                    {                        getlinkmans(1);                    }	            });            }
            else
            {
                $("#"+manid).removeClass('tr_pass');
                $("#"+manid).removeClass('tr_cancel');
            }
        }
        
	    $(document).ready(function(){            $('#chkflag').val('1');
            getlinkmans(1);	    });    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="nav">
            <a id="menu01" class="now" onclick="findlist('1')"><span>新申请</span></a><a id="menu02" onclick="findlist('2')"><span>续申请</span></a><a id="menu04" onclick="findlist('4')"><span>已通过</span></a><a id="menu05" onclick="findlist('5')"><span>未通过</span></a>
        </div>
        <div class="clear"></div><div id="status"><div id="mancount"></div>
        <div id="disarea">
        <table width="100%">
            <tr>
                <td style="background-color: #ffffff;">
                    <div id="chklist"></div>
                </td>
            </tr>
        </table>
        </div>
    </div>
    <div id="myhidediv" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; VISIBILITY: hidden; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; HEIGHT: 1px"><asp:TextBox id="chkflag" runat="server"></asp:TextBox></div>
    </form>
</body>
</html>
